package com.example.demo.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;
import org.joda.money.Money;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Entity //实体
@Table(name = "t_category")//数据库的表名
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder

public class Category {
    @Id //主键
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer id;
    //@Column(name="name")//列
    @NotBlank //校验
    public  String name;



}
